<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./index.js"></script>
</head>
<body>
    <div>
        <h1>一级标题</h1>
    </div>
    <script>
        $('h1').addEventListener('click',function(){
            alert('h1被点击');
        },true);
        $('div').addEventListener('click',function(){
            alert('div被点击');
        },true);
        document.body.addEventListener("click",function(){
            alert('body被点击');
        },true);
    </script>
</body>
</html>